import os
import cv2

source_file = r'D:\code\Fast-Lane-Detection\Tusimple\my_test.txt'
print (os.getcwd())
cwd = os.getcwd()

f1 = open(r'D:\code\Fast-Lane-Detection\Tusimple\train.txt', 'w')
with open(source_file,'r') as f:
    txt = f.readlines()

    for ii, line in enumerate(txt):
        a = r"D:/code/Fast-Lane-Detection/Tusimple" + line.split()[0]+'\n'
        print(a)
        f1.write(a)
f1.close()
# 检测路径
img = cv2.imread(a)
cv2.imshow("1", img)
cv2.waitKey()